// Output logging information to console.
function log(text,...datas) {
  if (process.env.NODE_ENV === 'production' || process.env.VUE_APP_IS_PRODUCTION === 'production') return;
  var time = new Date();

  console.log("[" + time.toLocaleTimeString() + "] " + text); // [2021/8/7 下午6:13:55] xxx
  console.log(...datas)
}

// Output an error message to console.
function logError(text,...datas) {
  var time = new Date();

  console.trace("[" + time.toLocaleTimeString() + "] " + text);
  console.log(...datas)
}

module.exports = {
  log,
  logError
}
